package com.leslie.wukong.biz.product.controller;

import com.leslie.wukong.biz.product.domain.vo.ProductVO;
import com.leslie.wukong.biz.product.service.BusProductService;
import com.leslie.wukong.common.core.domain.RestResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * (wukong.bus_product)表控制层
 *
 * @author xxxxx
 */
@RestController
@RequestMapping("/busProduct")
@RequiredArgsConstructor
@Api(tags = "商品管理")
public class BusProductController {
    private final BusProductService busProductService;

    @PostMapping("/createProduct")
    @ApiOperation(value = "创建商品")
    public RestResult<Integer> createProduct(@RequestBody ProductVO param) {
        return busProductService.createProduct(param);
    }
}
